package com.u3k.mid;

import com.u3k.app.mid.utils.net.Callback;
import com.u3k.app.mid.utils.statistics.StatisticsManager;

class q implements Callback {
    final /* synthetic */ p a;

    q(p pVar) {
        this.a = pVar;
    }

    public void onFailure(int i, String str) {
        this.a.c.b = false;
        ay.b(this.a.c.f);
        StatisticsManager.getInstance().postLog(this.a.a);
        if (this.a.b != null) {
            this.a.b.b();
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onResponse(com.u3k.app.mid.utils.net.Response r6) {
        /*
        r5 = this;
        r0 = r5.a;
        r0 = r0.c;
        r1 = 0;
        r0.b = r1;
        r0 = r6.getString();
        r1 = com.u3k.mid.o.a;
        r2 = new java.lang.StringBuilder;
        r2.<init>();
        r3 = "checkLib onResponse resp=";
        r2 = r2.append(r3);
        r2 = r2.append(r0);
        r2 = r2.toString();
        com.u3k.mid.au.b(r1, r2);
        r1 = new org.json.JSONObject;	 Catch:{ Exception -> 0x007e }
        r1.<init>(r0);	 Catch:{ Exception -> 0x007e }
        r0 = r5.a;	 Catch:{ Exception -> 0x0071 }
        r0 = r0.c;	 Catch:{ Exception -> 0x0071 }
        r0 = r0.libUrl;	 Catch:{ Exception -> 0x0071 }
        com.u3k.mid.ay.a(r0);	 Catch:{ Exception -> 0x0071 }
        r0 = "domain";
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x0071 }
        if (r0 == 0) goto L_0x0048;
    L_0x0039:
        r0 = "domain";
        r0 = r1.optString(r0);	 Catch:{ Exception -> 0x0071 }
        r2 = r5.a;	 Catch:{ Exception -> 0x0071 }
        r2 = r2.c;	 Catch:{ Exception -> 0x0071 }
        r2 = r2.libUrl;	 Catch:{ Exception -> 0x0071 }
        com.u3k.mid.ay.a(r2, r0);	 Catch:{ Exception -> 0x0071 }
    L_0x0048:
        r0 = "result";
        r0 = r1.getString(r0);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x0058;
    L_0x0050:
        r2 = "0";
        r0 = r0.equals(r2);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x009b;
    L_0x0058:
        r0 = r5.a;	 Catch:{ Exception -> 0x007e }
        r0 = r0.b;	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x0065;
    L_0x005e:
        r0 = r5.a;	 Catch:{ Exception -> 0x007e }
        r0 = r0.b;	 Catch:{ Exception -> 0x007e }
        r0.b();	 Catch:{ Exception -> 0x007e }
    L_0x0065:
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r5.a;
        r1 = r1.a;
        r0.postLog(r1);
    L_0x0070:
        return;
    L_0x0071:
        r0 = move-exception;
        r2 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();	 Catch:{ Exception -> 0x007e }
        r3 = com.u3k.mid.ae.a();	 Catch:{ Exception -> 0x007e }
        r2.logException(r3, r0);	 Catch:{ Exception -> 0x007e }
        goto L_0x0048;
    L_0x007e:
        r0 = move-exception;
        r1 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();	 Catch:{ all -> 0x015f }
        r2 = com.u3k.mid.ae.a();	 Catch:{ all -> 0x015f }
        r1.logException(r2, r0);	 Catch:{ all -> 0x015f }
        r1 = "error";
        com.u3k.mid.au.a(r1, r0);	 Catch:{ all -> 0x015f }
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r5.a;
        r1 = r1.a;
        r0.postLog(r1);
        goto L_0x0070;
    L_0x009b:
        r0 = "rereg";
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x00b8;
    L_0x00a3:
        r0 = "rereg";
        r0 = r1.getInt(r0);	 Catch:{ Exception -> 0x007e }
        r2 = 1;
        if (r0 != r2) goto L_0x00b8;
    L_0x00ac:
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r5.a;
        r1 = r1.a;
        r0.postLog(r1);
        goto L_0x0070;
    L_0x00b8:
        r0 = "modules";
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x00d3;
    L_0x00c0:
        r0 = "modules";
        r0 = r1.getJSONArray(r0);	 Catch:{ Exception -> 0x007e }
        r2 = r5.a;	 Catch:{ Exception -> 0x007e }
        r2 = r2.c;	 Catch:{ Exception -> 0x007e }
        r2 = r2.libUrl;	 Catch:{ Exception -> 0x007e }
        r2 = com.u3k.app.mid.core.ModuleManager.getInstance(r2);	 Catch:{ Exception -> 0x007e }
        r2.parseModuleInfos(r0);	 Catch:{ Exception -> 0x007e }
    L_0x00d3:
        r0 = "logExc";
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x010e;
    L_0x00db:
        r0 = "logExc";
        r0 = r1.getString(r0);	 Catch:{ Exception -> 0x007e }
        r2 = com.u3k.mid.o.a;	 Catch:{ Exception -> 0x007e }
        r3 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x007e }
        r3.<init>();	 Catch:{ Exception -> 0x007e }
        r4 = "checkLib  logException = ";
        r3 = r3.append(r4);	 Catch:{ Exception -> 0x007e }
        r3 = r3.append(r0);	 Catch:{ Exception -> 0x007e }
        r3 = r3.toString();	 Catch:{ Exception -> 0x007e }
        com.u3k.mid.au.b(r2, r3);	 Catch:{ Exception -> 0x007e }
        r2 = r5.a;	 Catch:{ Exception -> 0x007e }
        r2 = r2.c;	 Catch:{ Exception -> 0x007e }
        r2 = r2.libUrl;	 Catch:{ Exception -> 0x007e }
        r3 = "KEY_LOG_EXC";
        r4 = "1";
        r0 = r4.equals(r0);	 Catch:{ Exception -> 0x007e }
        r0 = java.lang.Boolean.valueOf(r0);	 Catch:{ Exception -> 0x007e }
        com.u3k.mid.bb.a(r2, r3, r0);	 Catch:{ Exception -> 0x007e }
    L_0x010e:
        r0 = "duration";
        r0 = r1.has(r0);	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x0145;
    L_0x0116:
        r0 = "duration";
        r0 = r1.getInt(r0);	 Catch:{ Exception -> 0x007e }
        r1 = com.u3k.mid.o.a;	 Catch:{ Exception -> 0x007e }
        r2 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x007e }
        r2.<init>();	 Catch:{ Exception -> 0x007e }
        r3 = "checkLib  duration = ";
        r2 = r2.append(r3);	 Catch:{ Exception -> 0x007e }
        r2 = r2.append(r0);	 Catch:{ Exception -> 0x007e }
        r2 = r2.toString();	 Catch:{ Exception -> 0x007e }
        com.u3k.mid.au.b(r1, r2);	 Catch:{ Exception -> 0x007e }
        r1 = r5.a;	 Catch:{ Exception -> 0x007e }
        r1 = r1.c;	 Catch:{ Exception -> 0x007e }
        r1 = r1.libUrl;	 Catch:{ Exception -> 0x007e }
        r2 = "check_update_interval";
        r0 = r0 * 1000;
        r0 = java.lang.Integer.valueOf(r0);	 Catch:{ Exception -> 0x007e }
        com.u3k.mid.bb.a(r1, r2, r0);	 Catch:{ Exception -> 0x007e }
    L_0x0145:
        r0 = r5.a;	 Catch:{ Exception -> 0x007e }
        r0 = r0.b;	 Catch:{ Exception -> 0x007e }
        if (r0 == 0) goto L_0x0152;
    L_0x014b:
        r0 = r5.a;	 Catch:{ Exception -> 0x007e }
        r0 = r0.b;	 Catch:{ Exception -> 0x007e }
        r0.a();	 Catch:{ Exception -> 0x007e }
    L_0x0152:
        r0 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r1 = r5.a;
        r1 = r1.a;
        r0.postLog(r1);
        goto L_0x0070;
    L_0x015f:
        r0 = move-exception;
        r1 = com.u3k.app.mid.utils.statistics.StatisticsManager.getInstance();
        r2 = r5.a;
        r2 = r2.a;
        r1.postLog(r2);
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.u3k.mid.q.onResponse(com.u3k.app.mid.utils.net.Response):void");
    }
}
